// "Copyright [2021] <Copyright Shengkai Lin>"

#ifndef CLUSTER_OPTICAL_DEVICES_OCS_H_
#define CLUSTER_OPTICAL_DEVICES_OCS_H_

#include <unordered_map>
#include <vector>
#include <string>
#include "cluster/basic/ai_sim.h"

namespace ai_sim {

class OCS : public omnetpp::cSimpleModule {
using opti_gate = omnetpp::cGate;
 private:
      double switch_delay;
      int my_index;

      // Map from self port id to dest gate ptr
      unordered_map<int, opti_gate*> opti_in_gates;
      unordered_map<int, opti_gate*> opti_out_gates;

 protected:
    void initialize() override;
    // The following redefined virtual function holds the algorithm.
    void handleMessage(omnetpp::cMessage *msg) override;
};
}  // namespace ai_sim

#endif  // CLUSTER_OPTICAL_DEVICES_OCS_H_
